package structures;
import pack.MyReader;

public class CardNumber extends TypeAbstract{

	public static int size = 16;
	public final String driverIdentification; //IA5 String (14)
	public final CardReplacementIndex cardReplacementIndex;
	public final CardRenewalIndex cardRenewalIndex;
	
	public CardNumber(MyReader reader)
	{
		driverIdentification = reader.readIA5(14);
		cardReplacementIndex = new CardReplacementIndex(reader);
		cardRenewalIndex = new CardRenewalIndex(reader);
	}
	
	public String toString()
	{
		return driverIdentification
			+ "-"
			+ cardReplacementIndex.value
			+ "-"
			+ cardRenewalIndex.value;
	}
}
